//
//  JSBaseCollectionCell.h
//  NiubilityProject
//
//  Created by Apple on 2018/3/29.
//  Copyright © 2018年 Apple. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "JSCellDataAdapter.h"

@class JSBaseCollectionCell;

@protocol JSBaseCollectionCellDelegate <NSObject>

@optional
- (void)js_customCollectionCell:(JSBaseCollectionCell *)cell action:(id)action;

@end


@interface JSBaseCollectionCell : UICollectionViewCell
@property (nonatomic, weak) id <JSBaseCollectionCellDelegate>   delegate;
@property (nonatomic, weak) JSCellDataAdapter                  *dataAdapter;
@property (nonatomic, weak) id                                  data;
@property (nonatomic, weak) NSIndexPath                        *indexPath;
@property (nonatomic, weak) UICollectionView                   *collectionView;
@property (nonatomic, weak) UIViewController                   *controller;
@property (nonatomic      ) BOOL                                displayCell;

- (void)js_setupCell;
- (void)js_buildSubview;
- (void)js_loadContent;
- (void)js_selectedEvent;
+ (JSCellDataAdapter *)js_dataAdapterWithCellReuseIdentifier:(NSString *)reuseIdentifier
                                                        data:(id)data
                                                  cellHeight:(CGFloat)height
                                                        type:(NSInteger)type;
@end
